package cn.mesmile.design.builder;

/**
 * @author zb
 * @date 2020/11/15 15:11
 * @Description: 具体的建造者，实现builder来创建不同的产品
 */
public class HighComputerBuilder implements ComputerBuilder {

    private Computer computer = new Computer();

    @Override
    public void buildCpu() {
        computer.setCpu(">>>>>>> 2创建CPU");
    }

    @Override
    public void buildDisk() {
        computer.setDisk(">>>>>>> 2创建DISK");
    }

    @Override
    public void buildPower() {
        computer.setPower(">>>>>>> 2创建POWER");
    }

    @Override
    public void buildMemory() {
        computer.setMemory(">>>>>>> 2创建MEMORY");
    }

    @Override
    public Computer createComputer() {
        return computer;
    }
}
